from django.urls import path
from .views import *

urlpatterns = [
    path('pre-sale/orders', CreateOrderPreView.as_view()),
    path('buy-in/orders', CreateOrderBuyView.as_view()),
    path('take-out/orders', CreateOrderTakeView.as_view()),
    path('take-out/orders/<str:id>', CreateOrderTakeUpdateView.as_view()),
    path('pre-sale/products/<str:product_id>/blocks', GetGoodBlockPre.as_view()),
    path('trade/market-orders/<str:id>/blocks', GetGoodBlockTrade.as_view()),
    path('orders/<str:id>/blocks', DetailOrderView.as_view()),
    path('gift/orders', GiftOrderView.as_view()),
    path('gift/<str:type>', GiftRefuseView.as_view()),
    path('gift/edit', GiftEditView.as_view()),
    path('delete', DeleteOrderView.as_view(), name='删除订单'),
    path('pickup/giftpack/<str:market_order_id>', PickupGiftpack.as_view(), name='领取礼物包'),

    # 支付宝 支付和回调
    path('orders/<str:id>/pay', OrderPayView.as_view()),
    # 订单支付APP回调
    # path('orders/<str:id>/pay/callback', OrderPayAppCallbackView.as_view(), name="APP支付回调"),
    # 供应商 支付宝 回调
    path('orders/pay/alipay/callback', AlipayOrderPayProviderCallbackView.as_view(), name="支付宝供应商回调"),
    # 供应商 微信支付 回调
    path('orders/pay/wxpay/callback', WxpayOrderPayProviderCallbackView.as_view(), name='微信支付供应商回调'),

    path('orders/<str:id>', OrderDetailView.as_view(), name='订单详情'),

]
